<template>
    <div id="app" v-loading="loading">
        <div class="title">
                文本类型 
                <el-button class="f1" 
                    style="float:right;margin-top:-5px;" size="medium"
                    @click="addTextType"
                >
                    添加类型
                </el-button>
        </div>
        <el-table :data="tableData" border>
            <el-table-column prop="name" label="名称" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.name"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="test" label="正则表达式" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.regex"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="id" label="可操作的功能ID" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.operations"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="btn" label="操作" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                <div class="tableBtn">
                    <el-popconfirm title="真的要删除这条信息吗?"
                        @onConfirm="deleteTextType(scope.$index)"
                    >
                        <a class="gray" slot="reference">删除</a>
                    </el-popconfirm>
                </div>
                </template>
            </el-table-column>
        </el-table>
        <div class="title">
            方法列表
            <font style="font-size:13px;margin-left:20px;">{$1}代表引用用户输入的内容</font>
            <el-button class="f1" style="float:right;margin-top:-5px;" size="medium"
                @click="addWayType"
            >
                添加方法
            </el-button>
        </div>
        <el-table :data="tableData1" border>
            <el-table-column prop="id" label="ID" :show-overflow-tooltip="true"></el-table-column>
            <el-table-column prop="app_name" label="APP功能名称" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.app_name"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="app_command" label="APP操作方法" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.app_command"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="app_ext" label="APP额外参数" :show-overflow-tooltip="true">
            <template slot-scope="scope">
                    <el-input v-model="scope.row.app_ext"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="h5_name" label="H5功能名称" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.h5_name"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="h5_command" label="H5操作方法" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.h5_command"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="h5_ext" label="H5额外参数" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                    <el-input v-model="scope.row.h5_ext"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="btn" label="操作" :show-overflow-tooltip="true">
                <template slot-scope="scope">
                <div class="tableBtn">
                    <el-popconfirm title="真的要删除这条信息吗?"
                        @onConfirm="deleteWayType(scope.$index)"
                    >
                        <a class="gray" slot="reference">删除</a>
                    </el-popconfirm>
                </div>
                </template>
            </el-table-column>
        </el-table>
        <el-button type="primary" :style="{'margin-top':'60px'}"
            @click="sumbit"
        >立即保存</el-button>
    </div>
</template>
<script>
    import PushSet from './index.js';
    export default PushSet;
</script>
<style lang="scss" scoped>
    .title{
        margin-bottom:25px;
        font-size:21px;
        margin-top:65px;
    }
</style>